//
//  NSString+Format.m
//  AmberWeather
//
//  Created by LeeSongtao on 16/3/4.
//  Copyright © 2016年 Amber Weather. All rights reserved.
//

#import "NSString+Format.h"

@implementation NSString (Format)

- (NSString *)stringFormat
{
    if (self.length > 0 && [self rangeOfString:@"null"].location == NSNotFound) {
        return self;
    }
    return @"";
}

+ (NSString *)dateTextWithDate:(NSDate *)date
{
    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    // 设置日期格式
    formatter.dateFormat = @"HH:mm";
    // 取出日期字符串
    return [formatter stringFromDate:date];
}



@end
